import VueRouter from 'vue-router'

// 导入4个tabbar路由
import HomeContainer from './components/tabber/HomeContainer.vue'
import MemberContainer from './components/tabber/MemberContainer.vue'
import ShopcarContainer from './components/tabber/ShopcarContainer.vue'
import SearchContainer from './components/tabber/SearchContainer.vue'
// 新闻列表路由
import NewsList from './components/newsList/newsList.vue'
//新闻信息的组件
import NewsInfo from './components/newsList/NewsInfo.vue'
// 导入图片列表
import ImgList from './components/image/imgList.vue'
import ImgInfo from './components/image/imgInfo.vue'
// 商品列表
import GoodsList from './components/goods/GoodsList.vue'
import GoodsInfo from './components/goods/GoodsInfo.vue'
import GoodsComment from "./components/goods/GoodsComment.vue"
import GoodsDesc from "./components/goods/GoodsDesc.vue"

// 3. 创建路由对象
var router = new VueRouter({
  routes: [
  	{ path:'/',redirect:'/home' },
  	{ path:'/home', component:HomeContainer},
  	{ path:'/member', component:MemberContainer},
  	{ path:'/shopcar', component:ShopcarContainer },
  	{ path:'/search', component: SearchContainer },
  	{ path:'/home/newsList', component:NewsList },
  	{ path:'/home/newsList/9527', component:NewsInfo },
  	{ path:'/home/imgList', component:ImgList },
  	{ path:'/home/imgInfo/88', component:ImgInfo  },
  	{ path:'/home/goodslist', component:GoodsList },
  	{ path:'/home/goodsinfo/89', component:GoodsInfo , name:'goodsinfo'},
  	{ path:'/home/goodsdesc/90',component:GoodsDesc, name:'goodsdesc' },
  	{ path:'/home/goodscomment/90', component:GoodsComment, name:'goodscomment' }


  ],
  linkActiveClass:'mui-active'
})

// 把路由对象暴露出去
export default router